package com.wmh.baseservice.user.pojo;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2022-12-07
 */
@ApiModel(value="UsVegetableOrder对象", description="采摘/种植 订单表")
public class UsVegetableOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "状态:	0待付款	1已付款	2商家已扫码核验(自提或者商家提前帮忙打包好)	3待评价	4已完成	-1已取消	-2已退款	")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "版本号")
    @Version
    private Integer version;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "唯一订单号")
    private String orderNum;

    @ApiModelProperty(value = "快照,json数组存储	商品id,名称，简介，价格,重量")
    private String snapshot;

    @ApiModelProperty(value = "菜地id")
    private Long plotId;

    @ApiModelProperty(value = "商家id")
    private Long merchantId;

    @ApiModelProperty(value = "总价(应付价格)")
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "实付价格")
    private BigDecimal realPrice;

    @ApiModelProperty(value = "抵扣的积分")
    private Double score;

    @ApiModelProperty(value = "用户上传的照片，最多3张")
    private String img;

    @ApiModelProperty(value = "用户id")
    private Long usId;

    @ApiModelProperty(value = "收货地址id,预留")
    private Long addressId;

    @ApiModelProperty(value = "订单二维码，交由商家现场扫码核验，保证见到用户本人或检验用户手上蔬菜")
    private String qrCode;

    @ApiModelProperty(value = "1采摘 2种植 3购物车结算")
    private Integer type;

    @ApiModelProperty(value = "支付时间")
    private Date payTime;

    @ApiModelProperty(value = "是否自提1是")
    private Integer hasTake;

    @ApiModelProperty(value = "自提时间/收货时间")
    private Date takeTime;

    @ApiModelProperty(value = "售后状态:	0:未申请售后	1:申请退款中	2:退款完成	")
    private Integer afterSalesStatus;

    @ApiModelProperty(value = "支付类型1余额支付 2微信支付")
    private Integer payType;

    @ApiModelProperty(value = "下单时该区域的商家类型 0：土地原持有人 1：租赁商家")
    private Integer merchantType; 

    @ApiModelProperty(value = "快递状态	0：待发货	1：运送中	2：已签收")
    private Integer courierStatus;

    @ApiModelProperty(value = "快递单号")
    private String courierNumber;

    @ApiModelProperty(value = "快递公司名称")
    private String courierCompany;

    @ApiModelProperty(value = "父订单号")
    @TableField(exist = false)
    private String parentOrder;

    public String getParentOrder() {
        return parentOrder;
    }

    public void setParentOrder(String parentOrder) {
        this.parentOrder = parentOrder;
    }

    public Long getId() {
        return id;
    }

    public UsVegetableOrder setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public UsVegetableOrder setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public UsVegetableOrder setRemark(String remark) {
        this.remark = remark;
        return this;
    }
    public Integer getVersion() {
        return version;
    }

    public UsVegetableOrder setVersion(Integer version) {
        this.version = version;
        return this;
    }
    public Date getCreateTime() {
        return createTime;
    }

    public UsVegetableOrder setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public UsVegetableOrder setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public String getOrderNum() {
        return orderNum;
    }

    public UsVegetableOrder setOrderNum(String orderNum) {
        this.orderNum = orderNum;
        return this;
    }
    public String getSnapshot() {
        return snapshot;
    }

    public UsVegetableOrder setSnapshot(String snapshot) {
        this.snapshot = snapshot;
        return this;
    }
    public Long getPlotId() {
        return plotId;
    }

    public UsVegetableOrder setPlotId(Long plotId) {
        this.plotId = plotId;
        return this;
    }
    public Long getMerchantId() {
        return merchantId;
    }

    public UsVegetableOrder setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
        return this;
    }
    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public UsVegetableOrder setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
        return this;
    }
    public BigDecimal getRealPrice() {
        return realPrice;
    }

    public UsVegetableOrder setRealPrice(BigDecimal realPrice) {
        this.realPrice = realPrice;
        return this;
    }
    public Double getScore() {
        return score;
    }

    public UsVegetableOrder setScore(Double score) {
        this.score = score;
        return this;
    }
    public String getImg() {
        return img;
    }

    public UsVegetableOrder setImg(String img) {
        this.img = img;
        return this;
    }
    public Long getUsId() {
        return usId;
    }

    public UsVegetableOrder setUsId(Long usId) {
        this.usId = usId;
        return this;
    }
    public Long getAddressId() {
        return addressId;
    }

    public UsVegetableOrder setAddressId(Long addressId) {
        this.addressId = addressId;
        return this;
    }
    public String getQrCode() {
        return qrCode;
    }

    public UsVegetableOrder setQrCode(String qrCode) {
        this.qrCode = qrCode;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public UsVegetableOrder setType(Integer type) {
        this.type = type;
        return this;
    }
    public Date getPayTime() {
        return payTime;
    }

    public UsVegetableOrder setPayTime(Date payTime) {
        this.payTime = payTime;
        return this;
    }
    public Integer getHasTake() {
        return hasTake;
    }

    public UsVegetableOrder setHasTake(Integer hasTake) {
        this.hasTake = hasTake;
        return this;
    }
    public Date getTakeTime() {
        return takeTime;
    }

    public UsVegetableOrder setTakeTime(Date takeTime) {
        this.takeTime = takeTime;
        return this;
    }
    public Integer getAfterSalesStatus() {
        return afterSalesStatus;
    }

    public UsVegetableOrder setAfterSalesStatus(Integer afterSalesStatus) {
        this.afterSalesStatus = afterSalesStatus;
        return this;
    }
    public Integer getPayType() {
        return payType;
    }

    public UsVegetableOrder setPayType(Integer payType) {
        this.payType = payType;
        return this;
    }
    public Integer getMerchantType() {
        return merchantType;
    }

    public UsVegetableOrder setMerchantType(Integer merchantType) {
        this.merchantType = merchantType;
        return this;
    }
    public Integer getCourierStatus() {
        return courierStatus;
    }

    public UsVegetableOrder setCourierStatus(Integer courierStatus) {
        this.courierStatus = courierStatus;
        return this;
    }
    public String getCourierNumber() {
        return courierNumber;
    }

    public UsVegetableOrder setCourierNumber(String courierNumber) {
        this.courierNumber = courierNumber;
        return this;
    }
    public String getCourierCompany() {
        return courierCompany;
    }

    public UsVegetableOrder setCourierCompany(String courierCompany) {
        this.courierCompany = courierCompany;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String ORDER_NUM = "order_num";

    public static final String SNAPSHOT = "snapshot";

    public static final String PLOT_ID = "plot_id";

    public static final String MERCHANT_ID = "merchant_id";

    public static final String TOTAL_PRICE = "total_price";

    public static final String REAL_PRICE = "real_price";

    public static final String SCORE = "score";

    public static final String IMG = "img";

    public static final String US_ID = "us_id";

    public static final String ADDRESS_ID = "address_id";

    public static final String QR_CODE = "qr_code";

    public static final String TYPE = "type";

    public static final String PAY_TIME = "pay_time";

    public static final String HAS_TAKE = "has_take";

    public static final String TAKE_TIME = "take_time";

    public static final String AFTER_SALES_STATUS = "after_sales_status";

    public static final String PAY_TYPE = "pay_type";

    public static final String MERCHANT_TYPE = "merchant_type";

    public static final String COURIER_STATUS = "courier_status";

    public static final String COURIER_NUMBER = "courier_number";

    public static final String COURIER_COMPANY = "courier_company";

    @Override
    public String toString() {
        return "UsVegetableOrder{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", version=" + version +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", orderNum=" + orderNum +
            ", snapshot=" + snapshot +
            ", plotId=" + plotId +
            ", merchantId=" + merchantId +
            ", totalPrice=" + totalPrice +
            ", realPrice=" + realPrice +
            ", score=" + score +
            ", img=" + img +
            ", usId=" + usId +
            ", addressId=" + addressId +
            ", qrCode=" + qrCode +
            ", type=" + type +
            ", payTime=" + payTime +
            ", hasTake=" + hasTake +
            ", takeTime=" + takeTime +
            ", afterSalesStatus=" + afterSalesStatus +
            ", payType=" + payType +
            ", merchantType=" + merchantType +
            ", courierStatus=" + courierStatus +
            ", courierNumber=" + courierNumber +
            ", courierCompany=" + courierCompany +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            UsVegetableOrder.ID
            ,UsVegetableOrder.STATUS
            ,UsVegetableOrder.REMARK
            ,UsVegetableOrder.VERSION
            ,UsVegetableOrder.CREATE_TIME
            ,UsVegetableOrder.UPDATE_TIME
            ,UsVegetableOrder.ORDER_NUM
            ,UsVegetableOrder.SNAPSHOT
            ,UsVegetableOrder.PLOT_ID
            ,UsVegetableOrder.MERCHANT_ID
            ,UsVegetableOrder.TOTAL_PRICE
            ,UsVegetableOrder.REAL_PRICE
            ,UsVegetableOrder.SCORE
            ,UsVegetableOrder.IMG
            ,UsVegetableOrder.US_ID
            ,UsVegetableOrder.ADDRESS_ID
            ,UsVegetableOrder.QR_CODE
            ,UsVegetableOrder.TYPE
            ,UsVegetableOrder.PAY_TIME
            ,UsVegetableOrder.HAS_TAKE
            ,UsVegetableOrder.TAKE_TIME
            ,UsVegetableOrder.AFTER_SALES_STATUS
            ,UsVegetableOrder.PAY_TYPE
            ,UsVegetableOrder.MERCHANT_TYPE
            ,UsVegetableOrder.COURIER_STATUS
            ,UsVegetableOrder.COURIER_NUMBER
            ,UsVegetableOrder.COURIER_COMPANY
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}